package com.shenzhen.group.niuniu.play;

import com.shenzhen.group.common.entity.HandCardGroupBase;
import com.shenzhen.group.common.game.Game;
import com.shenzhen.group.common.game.InvestGameTemplate;
import com.shenzhen.group.common.game.Position;
import com.shenzhen.group.common.player.Player;
import com.shenzhen.group.common.strategy.InvestStrategy;
import com.shenzhen.group.niuniu.card.NiuniuCardGroup;
import com.shenzhen.group.niuniu.card.NiuniuHandCardGroup;
import com.shenzhen.group.niuniu.card.NiuniuOperation;
import com.shenzhen.group.niuniu.controller.GameContext;
import com.shenzhen.group.niuniu.result.NiuniuCardResult;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;

/**
 * @author qiufei
 * @date 2021/9/20 14:46
 * @description 牛牛游戏的示例
 */
@Slf4j

public class NiuniuGame extends NiuniuAbstractGame {

    @Override
    public void init() {
        this.positions = new ArrayList<>();
        GameContext.getPlayerContext().get().forEach(t -> {
            positions.add(new Position(t));
            strategyMap.put(t.getId(), new InvestStrategy());
        });
//        NiuniuPlayer.getPlayers().forEach(t -> {
//            positions.add(new Position(t));
//            strategyMap.put(t.getId(), new InvestStrategy());
//        });
    }

    public NiuniuGame(int number) {
        this.number = number;
    }

    public NiuniuGame() {
    }
}
